﻿''' contour3d.py 三维数组定义的体数据的等值面可视化
'''
import numpy
from mayavi import mlab
 
x, y, z = numpy.ogrid[-5:5:64j, -5:5:64j, -5:5:64j]
scalars = x * x + y * y + z * z
obj = mlab.contour3d(scalars, contours=8, transparent=True)
mlab.show()